define(["base/declare","jquery","widget/Component"],function (declare,$,Component) {
    return declare([Component],{
        constructor: function(cfg){
            //构造函数
            this._dom = $('<input type="text" name="'+this.cfg.name+' class='+this.cfg.class+' " value="'+(this.cfg.value||"")+'"/>');
            if(this.cfg.width){
                this._dom.style("width",this.cfg.width);
            }

            if(this.cfg.height){
                this._dom.style("height",this.cfg.height);
            }

        },
        /**
         * 获得之间的值
         */
        getValue : function(){
            return this._dom.val();
        },
        /**
         * 设置组件的值
         */
        setValue : function(_v){
            this._dom.val(_v);
        },
        validate : function(){
            return {
                success : true
            };
        },
        renderUI : function(){
            this.container.empty();
            this.container.append(this.dom);
        }
    });
});